Skip to content

Instantly share code, notes, and snippets.

@davidteren
davidteren / nerd_fonts.md
Last active May 9, 2024 12:08
Install Nerd Fonts via Homebrew [updated & fixed]
@selcukcihan
selcukcihan / refactoring_ui.md
Created May 7, 2024 10:22
Notes from "Refactoring UI"

Refactoring UI

These are my notes from https://www.refactoringui.com

Starting

  • Start with a feature, not a layout. Details comes later, defer choices like color.
  • Establish a system (of choices): font size, weight, line height, colors, spacing, shadows etc.
  • Refrain from using font weights under 400 for UI work, to de-emphasize some text, use a lighter color or smaller font size instead.
@Chmarusso
Chmarusso / PaymentSplitter.sol
Created June 19, 2022 12:43
This smart contract will automatically divide the payment amount and push it to specified recipients.
pragma solidity ^0.8.15;
// SPDX-License-Identifier: MIT
contract PaymentSplitter {
address payable [] public recipients;
event TransferReceived(address _from, uint _amount);
constructor(address payable [] memory _addrs) {
for(uint i=0; i<_addrs.length; i++){
recipients.push(_addrs[i]);
@h3r2tic
h3r2tic / raymarch.hlsl
Last active May 9, 2024 12:04
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"
@sebtoun
sebtoun / UniformPoissonDiskSampler.cs
Created March 10, 2018 09:03
Poisson Disk Sampler
// Adapted from java source by Herman Tulleken
// http://www.luma.co.za/labs/2008/02/27/poisson-disk-sampling/
// The algorithm is from the "Fast Poisson Disk Sampling in Arbitrary Dimensions" paper by Robert Bridson
// http://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf
using System;
using System.Collections.Generic;
using UnityEngine;
using Random = System.Random;
@storopoli
storopoli / dioxus.json
Last active May 9, 2024 12:02
Devcontainers Configs
{
"name": "Dioxus",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/lee-orr/rusty-dev-containers/wasm32-unknown-unknown:0": {},
"ghcr.io/lee-orr/rusty-dev-containers/dioxus:0": {}
},
@diego3g
diego3g / settings.json
Last active May 9, 2024 11:59
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@derkmdt
derkmdt / watermeter.yaml
Created July 2, 2021 11:20
Wemos D1 mini with a LJ18A3-8-Z/BX NPN sensor
substitutions:
devicename: watermeter
upper_devicename: Watermeter
esphome:
name: $devicename
platform: ESP8266
board: d1_mini
wifi:
@yassineaboukir
yassineaboukir / List of API endpoints & objects
Last active May 9, 2024 11:53
A list of 3203 common API endpoints and objects designed for fuzzing.
0
00
01
02
03
1
1.0
10
100
1000